interface SvgIconProps {
    name: string;
    color?: string;
    size?: number | string;
    className?: string;
}

export default function SvgIcon(props: SvgIconProps) {
    const {name, size = 16, className = '', color: fill} = props;
    const id = `#icon-${name}`;
    return (
        <svg aria-hidden="true"
             width={size}
             height={size}
             style={{fill}} className={`svg-icon`.concat(className)}>
            <use href={id}/>
        </svg>
    );
}
